#include<stdio.h>
int main()
{
	int n = 0;
	scanf_s("%d", &n);
	for (int i = n; i <= n && i > 0; i--)
	{
		for (int a = i; a <= n && a > 0; a--)
		{
			printf("%d  ", a);
			if (a == 1)
			{
				char arr[] = { 0 };
				for (int j = 2; j <= i && j > 0; j++)
				{
					printf("%d  ", j);

				}
				printf("\n   ");
			}
		}


	}
	return 0;
}